<template>
  <div>
    <!-- Tabs 标签页 -->
    <div>
      <el-tabs v-model="activeName" @tab-click="handleClick">
        <el-tab-pane label="体检套餐" name="体检套餐">
          <!-- 这里写内容,插入子组件 -->
          <componentHeader></componentHeader>
          <componentItems></componentItems>
          <componentFooter></componentFooter>
        </el-tab-pane>
        <el-tab-pane label="体检项目" name="体检项目">
          <componentHeader></componentHeader>
          <componentItems></componentItems>
          <componentFooter></componentFooter>
        </el-tab-pane>
        <el-tab-pane label="套餐类型" name="套餐类型">
          <componentItems></componentItems>
          <componentFooter></componentFooter>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script>
// 导入子组件文件
import componentHeader from "./header";
import componentItems from "./items";
import componentFooter from "./footer";

export default {
  data() {
    return {
      activeName: "体检套餐",
      tab: "",
    };
  },
  computed: {
    commit() {
      
    }
  },
  methods: {
    handleClick() {
      window.sessionStorage.removeItem("key");
      window.sessionStorage.setItem("tab", this.activeName);
    },
  },
  // 注册的子组件标签
  components: {
    componentHeader,
    componentItems,
    componentFooter,
  },
};
</script>

<style lang="scss" scoped>
  @import "./scss/index.scss";
</style>